Skip to content

Review and tidy solr/modules/sql code - #4840

Open
epugh wants to merge 1 commit into
apache:mainfrom
epugh:split/modules-sql
Open

Review and tidy solr/modules/sql code#4840
epugh wants to merge 1 commit into
apache:mainfrom
epugh:split/modules-sql

Conversation

@epugh

@epugh epugh commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

Split out from #4743 into smaller, per-module PRs to make review easier. This PR contains the tidy-up changes to solr/modules/sql (Calcite/JDBC integration).

Solution

Leverage IntelliJ warnings (StringBuilder conversions in SolrFilter's AND/OR translation, .get(0).getFirst(), dead-code removal, javadoc/comment fixes). The SolrFilter/SolrAggregate/SolrEnumerator predicate-translation logic was checked to confirm AND/OR/NOT semantics are unchanged.

Includes a restored fix: two @SuppressWarnings("resource") annotations on ParallelStream declarations in SolrTable.java that had been dropped by the original tidy pass. ParallelStream is Closeable, but ownership transfers to the caller's stream chain rather than being closed locally in this method, so the annotation legitimately suppresses a false-positive resource-leak warning.

Tests

existing

Relates to #4743

Split out from apache#4743 into a per-module PR to make review easier.
Contains the tidy-up changes to solr/modules/sql (StringBuilder
conversions in SolrFilter's AND translation, .get(0) -> .getFirst(),
dead-code removal, javadoc/comment fixes).

Includes a restored fix: two @SuppressWarnings("resource")
annotations on ParallelStream declarations in SolrTable.java that
had been dropped by the tidy pass. ParallelStream is Closeable but
ownership transfers to the caller's stream chain rather than being
closed locally, so the annotation legitimately suppresses a
false-positive leak warning.
@epugh
epugh requested a review from risdenk August 31, 2026 17:26
@epugh epugh added this to the 10.x milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant